guard: the social picture and the language of a comment both stop drifting quietly - #44
Merged
Merged
Conversation
…fting quietly Two blind spots, both of which had already let something through. The social picture. The card is a page, rendered with the facts the registry holds, and the picture is a photograph of it taken by hand. The site guard renders every page and compares it with what is published, and it COPIES the picture - so a card that changed and a picture that did not are both green. That had happened. The committed picture said "21 formats" and "21 real formats" while the site said "24 real formats". Taken on 2026-08-29, card last rendered on 2026-08-31 when JPEG XL became the twenty fourth format. Three formats out of date, for three days, on the one image a stranger sees before anything else. The picture is retaken and a stamp beside it holds the digest of the card it is a photograph of. Any edit to the template, any new format, any changed word moves that digest and the guard goes red. Taking it needs a probe rather than four lines, and the reason cost one wrong picture: the card asks for its assets by absolute path, so opened as a file it finds none of them. That shot came out without the chickpea and without the window, looked entirely plausible, and had the right number of formats on it - so a check asking "is this current" would have said yes. The language of a comment. D9 makes everything in the repository English, comments included. Polish written without its accents is entirely ASCII, so it walks past the ASCII guard, past the punctuation guard and past every linter - and a six line Polish comment had already sat in internal/guard for a day, found by accident when misspell reported one word inside it as a typo. ascii_test.go said no automated check ever would catch this. That was a written impossibility with nothing holding it, and the limit was in the mechanism rather than the problem: asking about characters cannot see a language, asking about words can. The sentence is corrected in place with the date and the reason. The wordlist holds Polish words that are not also English words - to, on, we, by, do, za, ale, co and pod are all left out for exactly that reason. Comments only, because a literal may legitimately hold another language as test data and a comment has that excuse in no file. A word in capitals is a quoted value rather than prose, which is what two guards naming the Polish regression table turned out to need. Both proven by mutation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two blind spots, both of which had already let something through.
The social picture was three formats out of date
The card is a page, rendered with the facts the registry holds. The picture is a photograph of it, taken by hand and committed. The site guard renders every page and compares it with what is published, and it copies the picture - so a card that changed and a picture that did not are both green.
Picture taken 2026-08-29. Card last rendered 2026-08-31, when JPEG XL became the twenty fourth format. Three days, on the one image a stranger sees before anything else, with a green suite throughout.
The picture is retaken, and
web/social-preview.sha256holds the digest of the card it is a photograph of. Any template edit, any new format, any changed word moves that digest and the guard goes red with the three commands to fix it.Taking it needs a probe rather than four lines, and that cost one wrong picture. The card asks for its assets by absolute path, so opened as a
file://it finds none of them - that shot came out with no icon and no window screenshot, looked entirely plausible, and had the right format count on it. A check asking "is this current" would have said yes.A Polish comment cannot be seen by asking about characters
D9makes everything in the repository English, comments included. Polish written without its accents is entirely ASCII, so it walks past the ASCII guard, past the punctuation guard, and past every linter. A six line Polish comment had already sat ininternal/guardfor a day, found by accident whenmisspellreported one word inside it as a typo.ascii_test.gosaid "no automated check ever will". That was a written impossibility with nothing holding it, and the limit was in the mechanism rather than the problem - asking about characters cannot see a language, asking about words can. The sentence is corrected in place, with the date and the reason.The wordlist holds Polish words that are not also English words.
to,on,we,by,do,za,ale,coandpodare left out for exactly that reason. Comments only, because a literal may legitimately hold another language as test data and a comment has that excuse in no file.One rule came from measuring rather than from thinking: a word in capitals is a quoted value, not prose. Two guards that name the verdict column of the Polish regression table were reported by the first version.
Checks
Both proven by mutation.
preflight --quickgreen on all twelve,stalenessclean at 735 entries.🤖 Generated with Claude Code